package com.wyx.mhl.service;

import com.wyx.mhl.dao.MenuDao;
import com.wyx.mhl.domain.menu;

import java.util.List;

/**
 * @author 王艺锡
 * @version 1.0
 */
public class MenuService {
    private MenuDao menuDao = new MenuDao();

    //编写方法，返回全部菜单信息
    public List<menu> getAllMenu(){
        return menuDao.queryMulti("select * from menu",menu.class);
    }

    //编写方法，返回单个菜品信息
    public menu getSingleMenu(int menuID){
        return menuDao.querySingle("select * from menu where id = ?",menu.class,menuID);
    }


}
